/*
 * MIT License
 *
 * Copyright (c) 2020 Mr.css
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

package cn.seaboot.postman.root;

//      E.G.:
//      "variable": [
//          {
//          "id": "baseUrl",
//          "key": "baseUrl",
//          "value": "localhost:8081/sea",
//          "type": "string"
//          }
//      ],

/**
 * 一些常量配置
 *
 * 目前只用于声明项目 IP 地址，地址发生变化，可以一次性完成调整
 * <p>
 * Using variables in your Postman requests eliminates the need to duplicate requests,
 * which can save a lot of time. Variables can be defined, and referenced to from any part of a request.
 *
 * @author Mr.css
 * @version 2020-01-28 11:08
 */
public class Variable {
    /**
     * 常量 ID
     * <p>
     * A variable ID is a unique user-defined value that identifies the variable within a collection. In traditional terms, this would be a variable name.
     */
    private String id;
    /**
     * 常量 key 值
     * <p>
     * A variable key is a human friendly value that identifies the variable within a collection. In traditional terms, this would be a variable name.
     */
    private String key;
    /**
     * 常量数值
     * <p>
     * "The value that a variable holds in this collection. Ultimately, the variables will be replaced by this value,
     * when say running a set of requests from a collection
     */
    private String value;
    /**
     * 常量类型
     * <p>
     * A variable may have multiple types. This field specifies the type of the variable.
     * "enum": ["string","boolean","any","number",]
     */
    private String type = "string";

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "Variable{" +
                "id='" + id + '\'' +
                ", key='" + key + '\'' +
                ", value='" + value + '\'' +
                ", type='" + type + '\'' +
                '}';
    }
}
